package com.yz.aiks.multimodules.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import static com.yz.aiks.multimodules.config.HikariDataSourceConfig.HIKARI_DATASOURCE_PREFIX;

/**
 * @author <a href="mailto:aiks_yuan@163.com">yuanz</a>
 * @date 2022-02-18 10:32
 * @since 1.0.0
 **/
@ConfigurationProperties(prefix = HIKARI_DATASOURCE_PREFIX)
@Data
public class HikariDataSourceConfig {
    
    public static final String HIKARI_DATASOURCE_PREFIX = "aiks.spring.datasource";
    
    private String jdbcUrl;
    
    private String username;
    
    private String password;
    
    private String driverClassName;
    
    private int maximumPoolSize = 10;
    
    private int idleTimeout = 3000;
    
    private int maxLifetime = 18000;
    
    private int connectionTimeout = 5000;
    
    private String connectionTestQuery;
}
